import Vue from 'vue'
import VueRouter from 'vue-router'
import Find from '@/views/Find'
import My from '@/views/My'
import Friend from '@/views/Friend'
import Music from '@/views/Music'
import Mistake from '@/views/Mistake'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/find'
  },
  {
    path: '/find',
    component: Find
  },
  {
    path: '/my',
    component: My
  },
  {
    path: '/friend',
    component: Friend
  },
  {
    path: '/music/:id',
    component: Music
  },
  {
    path: '*',
    component: Mistake
  }
]

const router = new VueRouter({
  routes
})

export default router
